package cn.xutongxue.book_sales.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * @author XuTongXue
 * @since 2021-12-02
 */
@TableName("`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单主键
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;

    /**
     * 订单号
     */
    @TableField("order_number")
    private String orderNumber;

    /**
     * 创建订单人ID
     */
    @TableField("order_user_id")
    private Integer orderUserId;

    @TableField("order_name")
    private String orderName;

    @TableField("order_book_id")
    private String orderBookId;


    /**
     * 订单收货人联系方式
     */
    @TableField("order_phone")
    private String orderPhone;

    /**
     * 订单收货地址
     */
    @TableField("order_address")
    private String orderAddress;

    @TableField("order_book_number")
    private String orderBookNumber;

    /**
     * 创建订单时间
     */
    @TableField("order_create_time")
    private LocalDateTime orderCreateTime;

    /**
     * 订单状态(0:已支付,1:未支付:2:已取消3:已退款,4:待退款)
     */
    @TableField("order_state")
    private Integer orderState;

    public String getOrderBookId() {
        return orderBookId;
    }

    public void setOrderBookId(String orderBookId) {
        this.orderBookId = orderBookId;
    }

    public String getOrderBookNumber() {
        return orderBookNumber;
    }

    public void setOrderBookNumber(String orderBookNumber) {
        this.orderBookNumber = orderBookNumber;
    }

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }
    public Integer getOrderUserId() {
        return orderUserId;
    }

    public void setOrderUserId(Integer orderUserId) {
        this.orderUserId = orderUserId;
    }
    public String getOrderPhone() {
        return orderPhone;
    }

    public void setOrderPhone(String orderPhone) {
        this.orderPhone = orderPhone;
    }
    public String getOrderAddress() {
        return orderAddress;
    }

    public void setOrderAddress(String orderAddress) {
        this.orderAddress = orderAddress;
    }
    public LocalDateTime getOrderCreateTime() {
        return orderCreateTime;
    }

    public void setOrderCreateTime(LocalDateTime orderCreateTime) {
        this.orderCreateTime = orderCreateTime;
    }
    public Integer getOrderState() {
        return orderState;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    @Override
    public String toString() {
        return "Order{" +
            "orderId=" + orderId +
            ", orderNumber=" + orderNumber +
            ", orderUserId=" + orderUserId +
            ", orderBookId=" + orderBookId +
            ", orderPhone=" + orderPhone +
            ", orderAddress=" + orderAddress +
            ", orderBookNumber=" + orderBookNumber +
            ", orderCreateTime=" + orderCreateTime +
            ", orderState=" + orderState +
        "}";
    }
}
